<template>
  父组件-{{ msg }}
  <br />
  <input type="text" v-model="msg" />
  <br />
  <input type="text" :value="msg" @input="msg = $event.target.value" />
  <hr />
  <Son v-model="msg"></Son>
  <!-- <Son v-model="msg"></Son>相当于下面这样绑定值与方法 -->
  <!-- <Son :modelValue="msg" @update:modelValue="msg = $event"></Son> -->
  <hr />
  <SonB v-model="msg" />
</template>

<script>
import Son from './Son.手动传递实现.vue'
import SonB from './SonB.计算属性实现.vue'
export default {
  components: { Son, SonB },
  data() {
    return {
      msg: '',
    }
  },
}
</script>

<style scoped></style>
